package com.ruoyi.system.domain;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.util.Date;
import java.util.List;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

/**
 * 题材与股票的关系表
 * @TableName mini_stock_subject
 */
@TableName(value ="mini_stock_subject")
@Data
@NoArgsConstructor
@AllArgsConstructor
public class MiniStockSubject implements Serializable {
    /**
     * id
     */
    @TableId(type = IdType.AUTO)
    private Long id;

    /**
     * 股票id
     */
    private Long stockId;

    /**
     * 股票代码
     */
    private String stockNo;

    /**
     * 股票名称
     */
    private String stockName;

    /**
     * 题材id
     */
    private Long subjectId;

    /**
     * 创建时间
     */
    private Date created;

    @TableField(exist = false)
    private List<Long> selectedStockIds;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;

    public MiniStockSubject(Long stockId, String stockNo, String stockName, Long subjectId) {
        this.stockId = stockId;
        this.stockNo = stockNo;
        this.stockName = stockName;
        this.subjectId = subjectId;
    }
}